<?php

use Drupal\shusy_expert\Entity\ShusyExpert;
use Drupal\shusy_expert\Entity\ShusyExpertType;

function shusy_expert_shusy_expert_add_page() {
  $e = new ShusyExpert();
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_entity_form', $e, 'add');
}

function shusy_expert_shusy_expert_view_page(ShusyExpert $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_expert_shusy_expert_edit_page(ShusyExpert $e) {
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_entity_form', $e, 'edit');
}

function shusy_expert_shusy_expert_delete_page(ShusyExpert $e) {
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_delete_form', $e);
}

function shusy_expert_shusy_expert_type_add_page() {
  $e = new ShusyExpertType();
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_type_entity_form', $e, 'add');
}

function shusy_expert_shusy_expert_type_view_page(ShusyExpertType $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_expert_shusy_expert_type_edit_page(ShusyExpertType $e) {
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_type_entity_form', $e, 'edit');
}

function shusy_expert_shusy_expert_type_delete_page(ShusyExpertType $e) {
  module_load_include('inc', 'shusy_expert', 'shusy_expert.forms');
  return drupal_get_form('shusy_expert_shusy_expert_type_delete_form', $e);
}

